Trace-based just-in-time compilation for lazy functional programming languages
نویسنده
چکیده
This thesis investigates the viability of trace-based just-in-time (JIT) compilation for optimising programs written in the lazy functional programming language Haskell. A trace-based JIT compiler optimises only execution paths through the program, which is in contrast to method-based compilers that optimise complete functions at a time. The potential advantages of this approach are shorter compilation times and more natural interprocedural optimisation. Trace-based JIT compilers have previously been used successfully to optimise programs written in dynamically typed languages such as JavaScript, Python, or Lua, but also statically typed languages like Java or the Common Language Runtime (CLR). Lazy evaluation poses implementation challenges similar to those of dynamic languages, so trace-based JIT compilation promises to be a viable approach. In this thesis we focus on program performance, but having a JIT compiler available can simplify the implementation of features like runtime inspection and mobile code. We implemented Lambdachine, a trace-based JIT compiler which implements most of the pure subset of Haskell. We evaluate Lambdachine’s performance using a set of micro-benchmarks and a set of larger benchmarks from the “spectral” category of the Nofib benchmark suite. Lambdachine’s performance (excluding garbage collection overheads) is generally about 10 to 20 percent slower than GHC on statically optimised code. We identify the two main causes for this slow-down: trace selection and impeded heap allocation optimisations due to unnecessary thunk updates.
منابع مشابه
Lazy Functional Languages Abstract Interpretation And Compilation
No wonder you activities are, reading will be always needed. It is not only to fulfil the duties that you need to finish in deadline time. Reading will encourage your mind and thoughts. Of course, reading will greatly develop your experiences about everything. Reading lazy functional languages abstract interpretation and compilation is also a way as one of the collective books that gives many a...
متن کاملType Check Removal Using Lazy Interprocedural Code Versioning
Dynamically typed languages use runtime type checks to ensure safety. These checks are known to be a cause of performance issues. Several strategies are used to remove type checks but are expensive in a JIT compilation context or limited in the absence of code duplication. This paper presents an interprocedural approach based on Basic Block Versioning that allows the removal of many type checks...
متن کاملLazy Functional Languages Abstract Interpretation And Compilation
Now, we come to offer you the right catalogues of book to open. lazy functional languages abstract interpretation and compilation is one of the literary work in this world in suitable to be reading material. That's not only this book gives reference, but also it will show you the amazing benefits of reading a book. Developing your countless minds is needed; moreover you are kind of people with ...
متن کاملOptimising Compilation
This lecture considers the optimisation of functional programming languages (particularlyìazy' languages) based on`strictness analysis'. Such optimisations alter evaluation order to allow more eecient translation into von Neumann architecture or to increase the parallelism in a sequentially speciied system (such as that implied by lazy-semantics).
متن کاملA Concurrent Trace-based Just-In-Time Compiler for JavaScript
JavaScript is emerging as the ubiquitous language of choice for web browser applications. These applications increasingly execute on embedded mobile devices, and thus demand responsiveness (i.e., short pause times for system activities, such as compilation and garbage collection). To deliver responsiveness, web browsers, such as Firefox, have adopted trace-based Just-In-Time (JIT) compilation. ...
متن کامل